package com.atguigu.tingshu.search.service;

import co.elastic.clients.elasticsearch.core.SearchResponse;
import com.atguigu.tingshu.model.search.AlbumInfoIndex;
import com.atguigu.tingshu.model.search.SuggestIndex;
import com.atguigu.tingshu.query.search.AlbumIndexQuery;
import com.atguigu.tingshu.vo.search.AlbumSearchResponseVo;

import java.util.Collection;
import java.util.List;
import java.util.Map;

public interface SearchService {


    void upperAlbumInfoIndex(Long albumId);

    void lowerAlbumInfoIndex(Long albumId);

    AlbumSearchResponseVo albumInfo(AlbumIndexQuery albumIndexQuery);

    List<Map<String, Object>> albumInfoChannel(Long category1Id);

    List<String> completeSuggest(String keyword);

    // 对外部可见并能被其他服务所利用，所以在service层下创建
    void saveSuggetIndex(AlbumInfoIndex albumInfoIndex);

    Collection<String> parseSuggestResult(String mySuggestKeyword, SearchResponse<SuggestIndex> search);

    List<AlbumInfoIndex> findRankingList(Long category1Id, String dimension);

    void updateLatelyAlbumRanking();

}
